

{template header}

{template sidebar}

<!-- artile begin -->
<div class="article">
{template title}

<!-- 公共帐号信息  -->
<!--{if $a == 'index' || $a == 'lookAccount'}-->
    <table cellpadding="1" cellspacing="1" border="0" width="100%">


        <div class="view">
            <h1>筛选</h1>
            <ul>
                <li>
                    <span>帐号类型：</span>
                    <!--{loop $this->accountType $k $v}-->
                    <a href="{$this->url($c, lookAccount, array('key1' => $k ))}">{$v}</a>
                    <!--{/loop}-->
                </li>
            </ul>
        </div>

    <tr>
        <th width="15%" colspan="2">帐户名称</th>
        <th width="20%">帐户密码</th>
        <th width="15%">地址</th>
        <th width="15%" colspan="2">操作</th>


    </tr>

    <!--{if $result}-->
    <!--{loop $result $v}-->
    <tr>

        <td>{$v['accountId']}</td>
        <td>{$v['accountPass']}</td>
        <td>{$v['url']}</td>
        <td class="operate"><a href="{$this->url($c,'edit',array('id'=>$v['id']))}">编辑</a>
            <a title="删除" class="del" href="{$this->url($c,'del',array('id'=>$v['id']))}">删除</a></td>
    </tr>
    <!--{/loop}-->
    <!--{/if}-->

    <!--{if $pager}-->
    <!--分页开始-->
    <tr>
        <td colspan="6">
            <div class="page">{$pager}</div>
        </td>
    </tr>
    <!--分页结束-->
    <!--{/if}-->

    <!--{if $result == 0}-->
    <tr>
        <td colspan="6">没有数据记录！</td>
    </tr>
    <!--{/if}-->


    <tr>
        <td colspan="6" class="td4">
            <a title="添加物流公司" class="btn btn-success" href="{$this->url('account','addAccount')}">添加帐号信息</a>
        </td>
    </tr>


</table>
<!--{/if}-->

    <!--{if $a == 'editAccount' || $a == 'addAccount'}-->
    <form method="post" action="{$this->url($c, 'save', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <td class="td1" width="30%">帐号名称：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="accountName" placeholder="请输入帐号名称" class="required" value="{$a == 'edit' ? $result['accountName'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">帐号密码：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="accountPass" placeholder="请输入联系电话" class="required" value="{$a == 'edit' ? $result['accountPass'] : ''}" />

                </td>

            </tr>

            <tr>
                <td class="td1" width="30%">地址类型：</td>
                <td class="td2">
                    <select name="addrType" id="templateId" >
                        <!--{loop $this->accountType $k $v}-->
                        <option value="{$k}" {echo $result['addrType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                    </select>
                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">地址：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="addrUrl" placeholder="请输入联系电话" class="required" value="{$a == 'edit' ? $result['addrUrl'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">帐号说明：</td>
                <td class="td2">
                    <textarea name="sql" placeholder="请输入SQL语句" cols="60" rows="5" class="required"></textarea>
                </td>

            </tr>

            <tr>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

</div>
<!-- artile end -->
{template footer}